import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSON;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;

import java.util.Date;

public class GroovyScript {

    public static void main(String[] args) {
        try {
            String now = DateUtil.format(new Date(), "yyyy-MM-dd");
            System.out.println(now);


            JSONObject jsonObject = null;
            try {
                jsonObject = JSONUtil.parseObj("{\"msg\":null,\"succ\":asd,\"value\":\"{}\"}");
            } catch (Exception e) {
                e.printStackTrace();
            }

            if (jsonObject == null){
                System.out.println("null ok");
                return;
            }
            jsonObject.set("succ", null);
            Boolean succ = jsonObject.getBool("succ");
            if (null == succ){
                System.out.println(false);
            } else {
                if (succ){
                    System.out.println((boolean) succ);
                } else {
                    System.out.println(succ);
                }
            }
            System.out.println();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}
